home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / ObjectTcl-1.1 / examples / TicTacToe / README.TXT < prev    next >
Encoding:
Text File  |  1995-06-30  |  1.7 KB  |  59 lines

  1. TicTacToe
  2. ---------
  3.  
  4. This directory contains the Otcl code example for a distributed
  5. Tic Tac Toe game.
  6.  
  7. Out of all the code in this directory (851 lines) there are 4 lines
  8. responsible for the distribution.
  9.  
  10.     set port [otcl oserver init]
  11.     otcl oserver process
  12.  
  13.     in server
  14.  
  15.     and
  16.  
  17.     otcl oserver init
  18.     otcl remoteClass PlayerServer $playerServerAddress
  19.  
  20.     int ttt
  21.  
  22. The rest of the code is responsible the the representation of a simple
  23. Tic Tac Toe game as if it where all contained within a single
  24. process/execution space.
  25.  
  26. To Run
  27. ------
  28.  
  29. Start the player server using an otclsh process:
  30.  
  31. ../../otclsh server
  32.  
  33. This will start a player server process that is responsible for
  34. TicTacToe recording the players available on the network. The server
  35. will respond with the port number that it is listening on for player
  36. registration.
  37.  
  38. Start a TicTacToe player:
  39.  
  40. ../../owish -f ttt
  41.  
  42. You will be asked for your name, a nickname or whatever, and the address
  43. of the player server. For the address of the player server enter
  44. machine:port
  45. for the location of the player server.
  46.  
  47. TicTacToe then presents a dialogue with two buttons, quite and challenge.
  48. Selecting the challenge option shows a list of the current TicTacToe
  49. players available on the network. Select one or more of the available
  50. players and then choose the challenge option.
  51.  
  52. For each player you have challenged you will be presented with a familiar
  53. 3 x 3 board. Your marks are always shown as 'X' and your opponent as
  54. 'O'. The game will stop when all cells are filled or there is a winner.
  55.  
  56. It is possible to challenge yourself to a game. In this case you
  57. will be presented with two board. One from your perspective (as the
  58. challenger) and one from your perspective (as the challenged).
  59.